<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>File Source for parse_php.php</title>
	<link rel="stylesheet" type="text/css" href="../media/style.css">
	<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
	<script src="media/a.js"></script>
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
	<td class="header-top-left"><img src="../media/logo.png" border="0" alt="phpDocumentor " /></td>
    <td class="header-top-right">Examples<br /><div class="header-top-right-subpackage"></div></td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td colspan="2" class="header-menu">
      
                                      
                                    		[ <a href="../classtrees_Examples.html" class="menu">class tree: Examples</a> ]
		[ <a href="../elementindex_Examples.html" class="menu">index: Examples</a> ]
            [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="195" class="menu">
		<div class="package-title">Examples</div>
  <div class="package">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
	</div>
      <b>Packages:</b><br />
  <div class="package">
              <a href="../li_QueryPath.html">QueryPath</a><br />
              <a href="../li_Examples.html">Examples</a><br />
              <a href="../li_Tests.html">Tests</a><br />
      	</div>
      <br />
                        <br />
                      </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1 align="center">Source for file parse_php.php</h1>
<p>Documentation is available at <a href="../Examples/_examples---parse_php.php.html">parse_php.php</a></p>
<div class="src-code"><span class="php">
<ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-doc">&nbsp;*&nbsp;Parsing&nbsp;PHP&nbsp;with&nbsp;QueryPath</span></div></li>
<li><div class="src-line"><a name="a4"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;file&nbsp;contains&nbsp;an&nbsp;example&nbsp;of&nbsp;how&nbsp;QueryPath&nbsp;can&nbsp;be&nbsp;used</span></div></li>
<li><div class="src-line"><a name="a6"></a><span class="src-doc">&nbsp;*&nbsp;to&nbsp;parse&nbsp;a&nbsp;PHP&nbsp;file.&nbsp;Any&nbsp;well-formed&nbsp;XML&nbsp;or&nbsp;HTML&nbsp;document&nbsp;can&nbsp;be&nbsp;parsed.&nbsp;Since</span></div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-doc">&nbsp;*&nbsp;PHP&nbsp;tags&nbsp;are&nbsp;contained&nbsp;inside&nbsp;of&nbsp;processor&nbsp;instructions,&nbsp;an&nbsp;XML&nbsp;parser&nbsp;can</span></div></li>
<li><div class="src-line"><a name="a8"></a><span class="src-doc">&nbsp;*&nbsp;correctly&nbsp;parse&nbsp;such&nbsp;a&nbsp;file&nbsp;into&nbsp;a&nbsp;DOM.&nbsp;Consequently,&nbsp;you&nbsp;can&nbsp;use&nbsp;QueryPath</span></div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-doc">&nbsp;*&nbsp;to&nbsp;read,&nbsp;modify,&nbsp;and&nbsp;traverse&nbsp;PHP&nbsp;files.</span></div></li>
<li><div class="src-line"><a name="a10"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a11"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;example&nbsp;illustrates&nbsp;how&nbsp;such&nbsp;a&nbsp;file&nbsp;can&nbsp;be&nbsp;parsed&nbsp;and&nbsp;manipulated.</span></div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a13"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;Examples</span></div></li>
<li><div class="src-line"><a name="a14"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;M&nbsp;Butcher&nbsp;&lt;matt@aleph-null.tv&gt;</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@license</span><span class="src-doc">&nbsp;LGPL&nbsp;The&nbsp;GNU&nbsp;Lesser&nbsp;GPL&nbsp;(LGPL)&nbsp;or&nbsp;an&nbsp;MIT-like&nbsp;license.</span></div></li>
<li><div class="src-line"><a name="a16"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a17"></a><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line"><a name="a18"></a>&lt;html&gt;</div></li>
<li><div class="src-line"><a name="a19"></a>&lt;head&gt;</div></li>
<li><div class="src-line"><a name="a20"></a>&nbsp;&nbsp;&lt;title&gt;Parse&nbsp;PHP&nbsp;from&nbsp;QueryPath&lt;/title&gt;</div></li>
<li><div class="src-line"><a name="a21"></a>&lt;/head&gt;</div></li>
<li><div class="src-line"><a name="a22"></a>&lt;body&gt;</div></li>
<li><div class="src-line"><a name="a23"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a24"></a>require&nbsp;<span class="src-str">'../src/QueryPath/QueryPath.php'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a25"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a26"></a><span class="src-comm">//&nbsp;Parse&nbsp;this&nbsp;file&nbsp;with&nbsp;QueryPath.</span></div></li>
<li><div class="src-line"><a name="a27"></a>print&nbsp;<a href="../QueryPath/_src---QueryPath---QueryPath.php.html#functionqp">qp</a><span class="src-sym">(</span>__FILE__<span class="src-sym">,&nbsp;</span><span class="src-str">'title'</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">text</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a28"></a><span class="src-php">?&gt;</span></div></li>
<li><div class="src-line"><a name="a29"></a>&lt;/body&gt;</div></li>
<li><div class="src-line"><a name="a30"></a>&lt;/html&gt;</div></li>
</ol>
</span></div>
        <div class="credit">
		    <hr class="separator" />
		    Documentation generated on Thu, 19 Mar 2009 18:01:10 -0500 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.2</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>